package org.ITschool.support.util;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppcontextFactory {
	private static ApplicationContext context;
	  static {
	    	context=new ClassPathXmlApplicationContext("SpringITschool-*.xml");
	    }
   public static ApplicationContext getappContext(){
	   ApplicationContext aContext=new ClassPathXmlApplicationContext("SpringITschool-*.xml");
	   return aContext;
   }
  
   public static Object getBean(String beanName){
	   return context.getBean(beanName);
   }
}
